From: Eric S. Raymond Date: Tue, 27 Apr 1993 21:59:41 +0000 (+0000) Subject: (file-truename): Do the right thing when /home/gp2/eric = "". X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96467 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=8a5066940acc1bdc6cc8ac12b57849f5d390bec8;p=emacs.git (file-truename): Do the right thing when /home/gp2/eric = "". --- diff --git a/lisp/files.el b/lisp/files.el index b0f92ed0bb5..75e91e6b83d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -314,7 +314,10 @@ The truename of a file name is found by chasing symbolic links both at the level of the file and at the level of the directories containing it, until no links are left at any level." (if (string= filename "~") - (setq filename (expand-file-name filename))) + (progn + (setq filename (expand-file-name filename)) + (if (string= filename "") + (setq filename "/")))) (let ((handler (find-file-name-handler filename))) ;; For file name that has a special handler, call handler. ;; This is so that ange-ftp can save time by doing a no-op.